{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>School</th>\n",
       "      <th>Class</th>\n",
       "      <th>ID</th>\n",
       "      <th>Gender</th>\n",
       "      <th>Address</th>\n",
       "      <th>Height</th>\n",
       "      <th>Weight</th>\n",
       "      <th>Math</th>\n",
       "      <th>Physics</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>street_1</td>\n",
       "      <td>173</td>\n",
       "      <td>NaN</td>\n",
       "      <td>34.0</td>\n",
       "      <td>A+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>street_2</td>\n",
       "      <td>192</td>\n",
       "      <td>NaN</td>\n",
       "      <td>32.5</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>1103.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_2</td>\n",
       "      <td>186</td>\n",
       "      <td>NaN</td>\n",
       "      <td>87.2</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>S_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>street_2</td>\n",
       "      <td>167</td>\n",
       "      <td>81.0</td>\n",
       "      <td>80.4</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>1105.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_4</td>\n",
       "      <td>159</td>\n",
       "      <td>64.0</td>\n",
       "      <td>84.8</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1201.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>159</td>\n",
       "      <td>68.0</td>\n",
       "      <td>97.0</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1202.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_4</td>\n",
       "      <td>176</td>\n",
       "      <td>94.0</td>\n",
       "      <td>63.5</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>street_6</td>\n",
       "      <td>160</td>\n",
       "      <td>53.0</td>\n",
       "      <td>58.8</td>\n",
       "      <td>A+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1204.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_5</td>\n",
       "      <td>162</td>\n",
       "      <td>63.0</td>\n",
       "      <td>33.8</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1205.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_6</td>\n",
       "      <td>167</td>\n",
       "      <td>NaN</td>\n",
       "      <td>68.4</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1301.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>161</td>\n",
       "      <td>68.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>S_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1302.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_1</td>\n",
       "      <td>175</td>\n",
       "      <td>NaN</td>\n",
       "      <td>87.7</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1303.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>188</td>\n",
       "      <td>82.0</td>\n",
       "      <td>49.7</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1304.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_2</td>\n",
       "      <td>195</td>\n",
       "      <td>70.0</td>\n",
       "      <td>85.2</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>street_5</td>\n",
       "      <td>187</td>\n",
       "      <td>69.0</td>\n",
       "      <td>61.7</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2101.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>159</td>\n",
       "      <td>84.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2102.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_6</td>\n",
       "      <td>161</td>\n",
       "      <td>NaN</td>\n",
       "      <td>50.6</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2103.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>157</td>\n",
       "      <td>61.0</td>\n",
       "      <td>52.5</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>S_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2104.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_5</td>\n",
       "      <td>159</td>\n",
       "      <td>97.0</td>\n",
       "      <td>72.2</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2105.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>170</td>\n",
       "      <td>NaN</td>\n",
       "      <td>34.2</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2201.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>193</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2202.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_7</td>\n",
       "      <td>194</td>\n",
       "      <td>77.0</td>\n",
       "      <td>68.5</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2203.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>155</td>\n",
       "      <td>91.0</td>\n",
       "      <td>73.8</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>street_1</td>\n",
       "      <td>175</td>\n",
       "      <td>74.0</td>\n",
       "      <td>47.2</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2205.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_7</td>\n",
       "      <td>159</td>\n",
       "      <td>76.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2301.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_4</td>\n",
       "      <td>157</td>\n",
       "      <td>78.0</td>\n",
       "      <td>72.3</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>S_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2302.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>171</td>\n",
       "      <td>88.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2303.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_7</td>\n",
       "      <td>190</td>\n",
       "      <td>99.0</td>\n",
       "      <td>65.9</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2304.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_6</td>\n",
       "      <td>164</td>\n",
       "      <td>81.0</td>\n",
       "      <td>95.5</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2305.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>187</td>\n",
       "      <td>73.0</td>\n",
       "      <td>48.9</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2401.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_2</td>\n",
       "      <td>159</td>\n",
       "      <td>NaN</td>\n",
       "      <td>45.3</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2402.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>166</td>\n",
       "      <td>NaN</td>\n",
       "      <td>48.7</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2403.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_6</td>\n",
       "      <td>158</td>\n",
       "      <td>NaN</td>\n",
       "      <td>59.7</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2404.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_2</td>\n",
       "      <td>160</td>\n",
       "      <td>NaN</td>\n",
       "      <td>67.7</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2405.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_6</td>\n",
       "      <td>193</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.6</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   School Class      ID Gender   Address  Height  Weight  Math Physics\n",
       "0     S_1   C_1     NaN      M  street_1     173     NaN  34.0      A+\n",
       "1     S_1   C_1     NaN      F  street_2     192     NaN  32.5      B+\n",
       "2     S_1   C_1  1103.0      M  street_2     186     NaN  87.2      B+\n",
       "3     S_1   NaN     NaN      F  street_2     167    81.0  80.4     NaN\n",
       "4     S_1   C_1  1105.0    NaN  street_4     159    64.0  84.8      A-\n",
       "5     S_1   C_2  1201.0      M  street_5     159    68.0  97.0      A-\n",
       "6     S_1   C_2  1202.0      F  street_4     176    94.0  63.5      B-\n",
       "7     S_1   C_2     NaN      M  street_6     160    53.0  58.8      A+\n",
       "8     S_1   C_2  1204.0      F  street_5     162    63.0  33.8     NaN\n",
       "9     S_1   C_2  1205.0    NaN  street_6     167     NaN  68.4      B-\n",
       "10    S_1   C_3  1301.0      M  street_4     161    68.0   NaN      B+\n",
       "11    S_1   NaN  1302.0      F  street_1     175     NaN  87.7      A-\n",
       "12    S_1   C_3  1303.0      M  street_7     188    82.0  49.7       B\n",
       "13    S_1   C_3  1304.0    NaN  street_2     195    70.0  85.2     NaN\n",
       "14    S_1   C_3     NaN      F  street_5     187    69.0  61.7      B-\n",
       "15    S_2   C_1  2101.0      M  street_7     159    84.0   NaN       C\n",
       "16    S_2   C_1  2102.0      F  street_6     161     NaN  50.6      B+\n",
       "17    S_2   C_1  2103.0      M  street_4     157    61.0  52.5      B-\n",
       "18    S_2   NaN  2104.0      F  street_5     159    97.0  72.2      B+\n",
       "19    S_2   C_1  2105.0      M  street_4     170     NaN  34.2       A\n",
       "20    S_2   C_2  2201.0      M  street_5     193     NaN   NaN       B\n",
       "21    S_2   C_2  2202.0      F  street_7     194    77.0  68.5      B+\n",
       "22    S_2   C_2  2203.0      M  street_4     155    91.0  73.8     NaN\n",
       "23    S_2   C_2     NaN      M  street_1     175    74.0  47.2      B-\n",
       "24    S_2   C_2  2205.0    NaN  street_7     159    76.0   NaN       B\n",
       "25    S_2   C_3  2301.0      F  street_4     157    78.0  72.3      B+\n",
       "26    S_2   NaN  2302.0      M  street_5     171    88.0   NaN       A\n",
       "27    S_2   C_3  2303.0      F  street_7     190    99.0  65.9       C\n",
       "28    S_2   C_3  2304.0      F  street_6     164    81.0  95.5      A-\n",
       "29    S_2   C_3  2305.0      M  street_4     187    73.0  48.9       B\n",
       "30    S_2   C_4  2401.0      F  street_2     159     NaN  45.3       A\n",
       "31    S_2   C_4  2402.0      M  street_7     166     NaN  48.7       B\n",
       "32    S_2   C_4  2403.0    NaN  street_6     158     NaN  59.7      B+\n",
       "33    S_2   C_4  2404.0    NaN  street_2     160     NaN  67.7       B\n",
       "34    S_2   C_4  2405.0    NaN  street_6     193     NaN  47.6       B"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "df = pd.read_csv('data/table_missing.csv')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 35 entries, 0 to 34\n",
      "Data columns (total 9 columns):\n",
      "School     35 non-null object\n",
      "Class      31 non-null object\n",
      "ID         29 non-null float64\n",
      "Gender     28 non-null object\n",
      "Address    35 non-null object\n",
      "Height     35 non-null int64\n",
      "Weight     22 non-null float64\n",
      "Math       30 non-null float64\n",
      "Physics    31 non-null object\n",
      "dtypes: float64(3), int64(1), object(5)\n",
      "memory usage: 2.5+ KB\n"
     ]
    }
   ],
   "source": [
    "#最简单的 使用info函数查看缺失信息\n",
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "School      0\n",
       "Class       4\n",
       "ID          6\n",
       "Gender      7\n",
       "Address     0\n",
       "Height      0\n",
       "Weight     13\n",
       "Math        5\n",
       "Physics     4\n",
       "dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#统计每一列有多少个缺失值\n",
    "df.isna().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>School</th>\n",
       "      <th>Class</th>\n",
       "      <th>ID</th>\n",
       "      <th>Gender</th>\n",
       "      <th>Address</th>\n",
       "      <th>Height</th>\n",
       "      <th>Weight</th>\n",
       "      <th>Math</th>\n",
       "      <th>Physics</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1301.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>161</td>\n",
       "      <td>68.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2101.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>159</td>\n",
       "      <td>84.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2201.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>193</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2205.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_7</td>\n",
       "      <td>159</td>\n",
       "      <td>76.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>S_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2302.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>171</td>\n",
       "      <td>88.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   School Class      ID Gender   Address  Height  Weight  Math Physics\n",
       "10    S_1   C_3  1301.0      M  street_4     161    68.0   NaN      B+\n",
       "15    S_2   C_1  2101.0      M  street_7     159    84.0   NaN       C\n",
       "20    S_2   C_2  2201.0      M  street_5     193     NaN   NaN       B\n",
       "24    S_2   C_2  2205.0    NaN  street_7     159    76.0   NaN       B\n",
       "26    S_2   NaN  2302.0      M  street_5     171    88.0   NaN       A"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#挑出某一列是缺失值的行\n",
    "df[df['Math'].isna()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>School</th>\n",
       "      <th>Class</th>\n",
       "      <th>ID</th>\n",
       "      <th>Gender</th>\n",
       "      <th>Address</th>\n",
       "      <th>Height</th>\n",
       "      <th>Weight</th>\n",
       "      <th>Math</th>\n",
       "      <th>Physics</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1201.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>159</td>\n",
       "      <td>68.0</td>\n",
       "      <td>97.0</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1202.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_4</td>\n",
       "      <td>176</td>\n",
       "      <td>94.0</td>\n",
       "      <td>63.5</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1303.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>188</td>\n",
       "      <td>82.0</td>\n",
       "      <td>49.7</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2103.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>157</td>\n",
       "      <td>61.0</td>\n",
       "      <td>52.5</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2202.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_7</td>\n",
       "      <td>194</td>\n",
       "      <td>77.0</td>\n",
       "      <td>68.5</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2301.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_4</td>\n",
       "      <td>157</td>\n",
       "      <td>78.0</td>\n",
       "      <td>72.3</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2303.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_7</td>\n",
       "      <td>190</td>\n",
       "      <td>99.0</td>\n",
       "      <td>65.9</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2304.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_6</td>\n",
       "      <td>164</td>\n",
       "      <td>81.0</td>\n",
       "      <td>95.5</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2305.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>187</td>\n",
       "      <td>73.0</td>\n",
       "      <td>48.9</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   School Class      ID Gender   Address  Height  Weight  Math Physics\n",
       "5     S_1   C_2  1201.0      M  street_5     159    68.0  97.0      A-\n",
       "6     S_1   C_2  1202.0      F  street_4     176    94.0  63.5      B-\n",
       "12    S_1   C_3  1303.0      M  street_7     188    82.0  49.7       B\n",
       "17    S_2   C_1  2103.0      M  street_4     157    61.0  52.5      B-\n",
       "21    S_2   C_2  2202.0      F  street_7     194    77.0  68.5      B+\n",
       "25    S_2   C_3  2301.0      F  street_4     157    78.0  72.3      B+\n",
       "27    S_2   C_3  2303.0      F  street_7     190    99.0  65.9       C\n",
       "28    S_2   C_3  2304.0      F  street_6     164    81.0  95.5      A-\n",
       "29    S_2   C_3  2305.0      M  street_4     187    73.0  48.9       B"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#挑出完全没有缺失值的行\n",
    "df[df.notna().all(1)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>School</th>\n",
       "      <th>Class</th>\n",
       "      <th>ID</th>\n",
       "      <th>Gender</th>\n",
       "      <th>Address</th>\n",
       "      <th>Height</th>\n",
       "      <th>Weight</th>\n",
       "      <th>Math</th>\n",
       "      <th>Physics</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>street_1</td>\n",
       "      <td>173</td>\n",
       "      <td>NaN</td>\n",
       "      <td>34.0</td>\n",
       "      <td>A+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>street_2</td>\n",
       "      <td>192</td>\n",
       "      <td>NaN</td>\n",
       "      <td>32.5</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>1103.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_2</td>\n",
       "      <td>186</td>\n",
       "      <td>NaN</td>\n",
       "      <td>87.2</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>S_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>street_2</td>\n",
       "      <td>167</td>\n",
       "      <td>81.0</td>\n",
       "      <td>80.4</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_1</td>\n",
       "      <td>1105.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_4</td>\n",
       "      <td>159</td>\n",
       "      <td>64.0</td>\n",
       "      <td>84.8</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1201.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>159</td>\n",
       "      <td>68.0</td>\n",
       "      <td>97.0</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1202.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_4</td>\n",
       "      <td>176</td>\n",
       "      <td>94.0</td>\n",
       "      <td>63.5</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>street_6</td>\n",
       "      <td>160</td>\n",
       "      <td>53.0</td>\n",
       "      <td>58.8</td>\n",
       "      <td>A+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1204.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_5</td>\n",
       "      <td>162</td>\n",
       "      <td>63.0</td>\n",
       "      <td>33.8</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_2</td>\n",
       "      <td>1205.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_6</td>\n",
       "      <td>167</td>\n",
       "      <td>NaN</td>\n",
       "      <td>68.4</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1301.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>161</td>\n",
       "      <td>68.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>S_1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1302.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_1</td>\n",
       "      <td>175</td>\n",
       "      <td>NaN</td>\n",
       "      <td>87.7</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1303.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>188</td>\n",
       "      <td>82.0</td>\n",
       "      <td>49.7</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>1304.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_2</td>\n",
       "      <td>195</td>\n",
       "      <td>70.0</td>\n",
       "      <td>85.2</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>S_1</td>\n",
       "      <td>C_3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>street_5</td>\n",
       "      <td>187</td>\n",
       "      <td>69.0</td>\n",
       "      <td>61.7</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2101.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>159</td>\n",
       "      <td>84.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2102.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_6</td>\n",
       "      <td>161</td>\n",
       "      <td>NaN</td>\n",
       "      <td>50.6</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2103.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>157</td>\n",
       "      <td>61.0</td>\n",
       "      <td>52.5</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>S_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2104.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_5</td>\n",
       "      <td>159</td>\n",
       "      <td>97.0</td>\n",
       "      <td>72.2</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_1</td>\n",
       "      <td>2105.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>170</td>\n",
       "      <td>NaN</td>\n",
       "      <td>34.2</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2201.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>193</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2202.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_7</td>\n",
       "      <td>194</td>\n",
       "      <td>77.0</td>\n",
       "      <td>68.5</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2203.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>155</td>\n",
       "      <td>91.0</td>\n",
       "      <td>73.8</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>street_1</td>\n",
       "      <td>175</td>\n",
       "      <td>74.0</td>\n",
       "      <td>47.2</td>\n",
       "      <td>B-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_2</td>\n",
       "      <td>2205.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_7</td>\n",
       "      <td>159</td>\n",
       "      <td>76.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2301.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_4</td>\n",
       "      <td>157</td>\n",
       "      <td>78.0</td>\n",
       "      <td>72.3</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>S_2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2302.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_5</td>\n",
       "      <td>171</td>\n",
       "      <td>88.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2303.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_7</td>\n",
       "      <td>190</td>\n",
       "      <td>99.0</td>\n",
       "      <td>65.9</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2304.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_6</td>\n",
       "      <td>164</td>\n",
       "      <td>81.0</td>\n",
       "      <td>95.5</td>\n",
       "      <td>A-</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_3</td>\n",
       "      <td>2305.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_4</td>\n",
       "      <td>187</td>\n",
       "      <td>73.0</td>\n",
       "      <td>48.9</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2401.0</td>\n",
       "      <td>F</td>\n",
       "      <td>street_2</td>\n",
       "      <td>159</td>\n",
       "      <td>NaN</td>\n",
       "      <td>45.3</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2402.0</td>\n",
       "      <td>M</td>\n",
       "      <td>street_7</td>\n",
       "      <td>166</td>\n",
       "      <td>NaN</td>\n",
       "      <td>48.7</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2403.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_6</td>\n",
       "      <td>158</td>\n",
       "      <td>NaN</td>\n",
       "      <td>59.7</td>\n",
       "      <td>B+</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2404.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_2</td>\n",
       "      <td>160</td>\n",
       "      <td>NaN</td>\n",
       "      <td>67.7</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>S_2</td>\n",
       "      <td>C_4</td>\n",
       "      <td>2405.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>street_6</td>\n",
       "      <td>193</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.6</td>\n",
       "      <td>B</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   School Class      ID Gender   Address  Height  Weight  Math Physics\n",
       "0     S_1   C_1     NaN      M  street_1     173     NaN  34.0      A+\n",
       "1     S_1   C_1     NaN      F  street_2     192     NaN  32.5      B+\n",
       "2     S_1   C_1  1103.0      M  street_2     186     NaN  87.2      B+\n",
       "3     S_1   NaN     NaN      F  street_2     167    81.0  80.4     NaN\n",
       "4     S_1   C_1  1105.0    NaN  street_4     159    64.0  84.8      A-\n",
       "5     S_1   C_2  1201.0      M  street_5     159    68.0  97.0      A-\n",
       "6     S_1   C_2  1202.0      F  street_4     176    94.0  63.5      B-\n",
       "7     S_1   C_2     NaN      M  street_6     160    53.0  58.8      A+\n",
       "8     S_1   C_2  1204.0      F  street_5     162    63.0  33.8     NaN\n",
       "9     S_1   C_2  1205.0    NaN  street_6     167     NaN  68.4      B-\n",
       "10    S_1   C_3  1301.0      M  street_4     161    68.0   NaN      B+\n",
       "11    S_1   NaN  1302.0      F  street_1     175     NaN  87.7      A-\n",
       "12    S_1   C_3  1303.0      M  street_7     188    82.0  49.7       B\n",
       "13    S_1   C_3  1304.0    NaN  street_2     195    70.0  85.2     NaN\n",
       "14    S_1   C_3     NaN      F  street_5     187    69.0  61.7      B-\n",
       "15    S_2   C_1  2101.0      M  street_7     159    84.0   NaN       C\n",
       "16    S_2   C_1  2102.0      F  street_6     161     NaN  50.6      B+\n",
       "17    S_2   C_1  2103.0      M  street_4     157    61.0  52.5      B-\n",
       "18    S_2   NaN  2104.0      F  street_5     159    97.0  72.2      B+\n",
       "19    S_2   C_1  2105.0      M  street_4     170     NaN  34.2       A\n",
       "20    S_2   C_2  2201.0      M  street_5     193     NaN   NaN       B\n",
       "21    S_2   C_2  2202.0      F  street_7     194    77.0  68.5      B+\n",
       "22    S_2   C_2  2203.0      M  street_4     155    91.0  73.8     NaN\n",
       "23    S_2   C_2     NaN      M  street_1     175    74.0  47.2      B-\n",
       "24    S_2   C_2  2205.0    NaN  street_7     159    76.0   NaN       B\n",
       "25    S_2   C_3  2301.0      F  street_4     157    78.0  72.3      B+\n",
       "26    S_2   NaN  2302.0      M  street_5     171    88.0   NaN       A\n",
       "27    S_2   C_3  2303.0      F  street_7     190    99.0  65.9       C\n",
       "28    S_2   C_3  2304.0      F  street_6     164    81.0  95.5      A-\n",
       "29    S_2   C_3  2305.0      M  street_4     187    73.0  48.9       B\n",
       "30    S_2   C_4  2401.0      F  street_2     159     NaN  45.3       A\n",
       "31    S_2   C_4  2402.0      M  street_7     166     NaN  48.7       B\n",
       "32    S_2   C_4  2403.0    NaN  street_6     158     NaN  59.7      B+\n",
       "33    S_2   C_4  2404.0    NaN  street_2     160     NaN  67.7       B\n",
       "34    S_2   C_4  2405.0    NaN  street_6     193     NaN  47.6       B"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#只要有一个不是缺失值 该行就会被挑出来\n",
    "df[df.notna().any(1)]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "np.nan学习：在读取表格时，无论列存放什么类型的数据，默认的缺失值全部为np.nan类型"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "NaT针对的是时间序列的缺失值，可以看做是时序版本的np.nan"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "官方鼓励使用新的数据类型Nullable类型和缺失类型pd.NA"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Nullable类型 整形Int 所有缺失符号都会被替换为统一的NA符号\n",
    "布尔 dtype=\"boolean\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "convert_dtypes方法 作用是在读取数据的时候 将数据转为Nullable类型"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "pd.read_csv('data/table_missing.csv').convert_dtypes().dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9.0"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#缺失数据的加法和乘法规则\n",
    "#使用加法时，缺失值为0\n",
    "s = pd.Series([2,3,np.nan,4])\n",
    "s.sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "24.0"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#使用乘法时，缺失值为1\n",
    "s.prod()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "group函数中，自动忽略为缺失值的组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     A    B    C\n",
       "0  1.0  2.0  3.0\n",
       "1  3.0  4.0  5.0\n",
       "2  2.0  3.0  4.0"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#使用每一列的均值进行填充\n",
    "df_f = pd.DataFrame({'A':[1,3,np.nan],'B':[2,4,np.nan],'C':[3,5,np.nan]})\n",
    "df_f.fillna(df_f.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     A    B    C\n",
       "0  1.0  2.0  3.0\n",
       "1  3.0  4.0  5.0\n",
       "2  2.0  3.0  NaN"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#可以锁定填充的列\n",
    "df_f.fillna(df_f.mean()[['A','B']])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "dropna函数中的axis参数可以指定删除的行或列 axis = 0 按行删除 axis = 1 按列删除"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    A    B  C\n",
       "0 NaN  NaN  3\n",
       "1 NaN  3.0  2\n",
       "2 NaN  2.0  1"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_d = pd.DataFrame({'A':[np.nan,np.nan,np.nan],'B':[np.nan,3,2],'C':[3,2,1]})\n",
    "df_d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [A, B, C]\n",
       "Index: []"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_d.dropna(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   C\n",
       "0  3\n",
       "1  2\n",
       "2  1"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_d.dropna(axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>NaN</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     B  C\n",
       "0  NaN  3\n",
       "1  3.0  2\n",
       "2  2.0  1"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#how参数（可以选all或者any，表示全为缺失去除和存在缺失去除）\n",
    "df_d.dropna(axis=1,how='all')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    A    B  C\n",
       "1 NaN  3.0  2\n",
       "2 NaN  2.0  1"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#subset参数（即在某一组列范围中搜索缺失值）\n",
    "df_d.dropna(axis=0,subset=['B','C'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#线性插值\n",
    "#1：与索引无关的线性插值 interpolate函数会对缺失的值进行线性插值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.0\n",
       "1    2.0\n",
       "2    3.0\n",
       "3    4.0\n",
       "4    5.0\n",
       "5    NaN\n",
       "6    NaN\n",
       "7    8.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.Series([1,2,3,4,5,np.nan,np.nan,8])\n",
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x27876bf59e8>]"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd8luW9x/HPFcJI2CNsQtgzzAACahUcoDgQe6q1al3Y4ak9bYUgDiwOsEN9tbUWV7WuWhJEERCpIg5EhpJFwgh7JRAgi5Dx/M4f5LSWw3iAPLmfO/m+Xy9eJHjD8xXClytX7ut3OzNDRET8I8LrACIicmZU3CIiPqPiFhHxGRW3iIjPqLhFRHxGxS0i4jMqbhERn1Fxi4j4jIpbRMRnIkPxi7Zq1cri4uJC8UuLiNRIa9as2W9mMcFcG5LijouLY/Xq1aH4pUVEaiTn3LZgr9VWiYiIz6i4RUR8RsUtIuIzKm4REZ9RcYuI+ExQxe2c+x/nXLpzLs0596ZzrkGog4mIyImdtridcx2AnwEJZtYfqAPcEOpgIiJyYsFulUQCUc65SCAa2B26SCIi/rNqax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U7FObcVSDCzsL8v2jn3CvCpmb3gnKsHRJvZIa9znU5ln+0CRpjZ2Z5nOaVwWXEPBzaZWbaZlQJvAdd4nOmkzGw5kOd1jmCY2R4zW1v5dgGwHujgbaqTs2MKK9+tW/nN+9XFSTjnOgJXAi94naUmcc41AS4EXgQws1I/lHalscDmUJU2hE9xdwB2fOv9nYRxufhV5SPoBgMrvU1yapVbD98AOcCHZhbOeZ8GpgABr4MEyYAlzrk1lc+JDVddgVzg5cptqBeccw29DhWkG4A3Q/kC4VLcJ3oycNiusvzIOdcISAJ+bmb5Xuc5FTOrMLNBQEdguHMuLLejnHMTgBwzW+N1ljMw2syGAOOBn1Zu+4WjSGAI8GczGwwUAWH9tS+Ayi2dq4F/hPJ1wqW4dwKdvvV+R2C3R1lqnMq94iTgdTNL9jpPsCo/NV4GjPM4ysmMBq6u3Dd+CxjjnHvN20inZma7K7/PAeZxbJsyHO0Edn7rs625HCvycDceWGtm+0L5IuFS3KuAHs65LpX/Yt0AvOtxphqh8ot9LwLrzez3Xuc5HedcjHOuWeXbUcAlQKa3qU7MzKaZWUczi+PYx+xHZvYDj2OdlHOuYeUXqKncdrgMCMs7o8xsL7DDOder8ofGAmH5BfXj3EiIt0kgiGdOVgczK3fO3QN8ANQBXjKzdI9jnVTlA5QvAlo553YCD5t55I4OAAAAiUlEQVTZi96mOqnRwM1AauW+McD9ZrbQw0yn0g54pfIr8xHA22YW9rfZ+UQbYN6xf8uJBN4ws8XeRjql/wZer1zMZQO3eZznlJxz0Ry7M+7ukL9WONwOKCIiwQuXrRIREQmSiltExGdU3CIiPqPiFhHxGRW3iIjPqLhFRHxGxS0i4jMqbhERn/lfXh9sUdCVT3YAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(s.interpolate())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x27877a0f0f0>]"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd8luW9x/HPFcJI2CNsQtgzzAACahUcoDgQe6q1al3Y4ak9bYUgDiwOsEN9tbUWV7WuWhJEERCpIg5EhpJFwgh7JRAgi5Dx/M4f5LSWw3iAPLmfO/m+Xy9eJHjD8xXClytX7ut3OzNDRET8I8LrACIicmZU3CIiPqPiFhHxGRW3iIjPqLhFRHxGxS0i4jMqbhERn1Fxi4j4jIpbRMRnIkPxi7Zq1cri4uJC8UuLiNRIa9as2W9mMcFcG5LijouLY/Xq1aH4pUVEaiTn3LZgr9VWiYiIz6i4RUR8RsUtIuIzKm4REZ9RcYuI+ExQxe2c+x/nXLpzLs0596ZzrkGog4mIyImdtridcx2AnwEJZtYfqAPcEOpgIiJyYsFulUQCUc65SCAa2B26SCIi/rNqax7PfbK5Wl7rtMVtZruA3wLbgT3AYTNbcvx1zrnJzrnVzrnVubm5VZ9URCQMFR4t56H5aXz3uRW8sXI7xaXlIX/NYLZKmgPXAF2A9kBD59wPjr/OzOaYWYKZJcTEBHVqU0TE1z7ZkMvlTy3nb19u47bRcSy69wKi64XkQPp/COYVLgG2mFkugHMuGRgFvBbKYCIi4epgUSkz388gee0uurduxNwfjWJo5+bV9vrBFPd24DznXDRwBBgLaBCJiNQ6ZsaitL08ND+NQ8Vl/PeY7twzpjv1I+tUa47TFreZrXTOzQXWAuXA18CcUAcTEQknOfklPDg/jQ/S9xHfoSmv3j6Cvu2be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ljMw2syGAOOBn1Zu+4WjSGAI8GczGwwUAWH9tS+Ayi2dq4F/hPJ1wqW4dwKdvvV+R2C3R1lqnMq94iTgdTNL9jpPsCo/NV4GjPM4ysmMBq6u3Dd+CxjjnHvN20inZma7K7/PAeZxbJsyHO0Edn7rs625HCvycDceWGtm+0L5IuFS3KuAHs65LpX/Yt0AvOtxphqh8ot9LwLrzez3Xuc5HedcjHOuWeXbUcAlQKa3qU7MzKaZWUczi+PYx+xHZvYDj2OdlHOuYeUXqKncdrgMCMs7o8xsL7DDOder8ofGAmH5BfXj3EiIt0kgiGdOVgczK3fO3QN8ANQBXjKzdI9jnVTlA5QvAlo553YCD5t55I4OAAAAiUlEQVTZi96mOqnRwM1AauW+McD9ZrbQw0yn0g54pfIr8xHA22YW9rfZ+UQbYN6xf8uJBN4ws8XeRjql/wZer1zMZQO3eZznlJxz0Ry7M+7ukL9WONwOKCIiwQuXrRIREQmSiltExGdU3CIiPqPiFhHxGRW3iIjPqLhFRHxGxS0i4jMqbhERn/lfXh9sUdCVT3YAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#与索引有关的插值 在method方法中进行设置\n",
    "plt.plot(s.interpolate(method='index'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2012-05-01     0.0\n",
       "2012-05-07     NaN\n",
       "2012-06-03    10.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#如果索引是时间 那么可以按照时间长短插值\n",
    "s_t = pd.Series([0,np.nan,10]\n",
    "        ,index=[pd.Timestamp('2012-05-01'),pd.Timestamp('2012-05-07'),pd.Timestamp('2012-06-03')])\n",
    "s_t"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x27877a45748>]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xl4VPdh7vHvTzvaACEJJKSx2BGLMVjI+4axweAtXsE3aeo0cZo0juPaSbxkuU3sNHGSprlpe1s3SeM+SSRjm1wvYGPHNraT2ozEvoh9mZEEQgIktC8zv/vHjPMQIkBoRjqao/fzPHo0mjnLew7Sy2/OzJxjrLWIiEjsi3M6gIiIRIcKXUTEJVToIiIuoUIXEXEJFbqIiEuo0EVEXEKFLiLiEip0ERGXUKGLiLhEwmCuLDs72xYVFQ3mKkVEYt769esbrLU555puUAu9qKiIysrKwVyliEjMM8Yc6st0OuQiIuISKnQREZdQoYuIuIQKXUTEJVToIiIucc5CN8b80hhz1Biz7ZT7sowxbxlj9oS/jx7YmCIici59GaH/Clh82n2PAW9ba6cAb4d/FhERB52z0K217wPHT7v7NuC58O3ngNujnEtEJOZZa9nsb+QfXt1OdyA44Ovr7weLxlprDwNYaw8bY3LPNKEx5gHgAQCPx9PP1YmIxI6THd28vLGGMq+fHYdPMiIxnjvnFTBr/MgBXe+Af1LUWvss8CxASUmJrkgtIq5krWWDr5Eyr4/XttTS0R1kRl4mT90+i1svyiczJXHAM/S30OuMMXnh0XkecDSaoUREYkVTWzcrN1ZT7vWzq66ZtKR4PjG3gOWlhcwePxJjzKBl6W+hvwJ8Gvh++PvLUUskIjLEWWupOHiCMq+P1VsP09kTZE7BSP7xjtncMief9ORBPU3Wn5xzrcaYMuBaINsYUw18m1CRrzDG/A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XT3v6spzwiyQfv0Dzt5zlItjhp2vWWtsJ/Behp2UYY9aE5/85ofM/jDLGJJw2fwYwC1hrjDkIXAq8Yvr2wmgsbf+AcNE+uB9YGV7GXuAAoYJ03fYbY75N6HWCv//4PmvtSWttS/j2aiDRnPKicSzsg/BjL4Vv/47Q8fC+9sCAiOgSdIMpfCzqF0CVtfafTnnoFeDTwPfD31/uz3KstX5CI6WPp0sgfBFsoIbQRbDvCz+WZ609HF7W7cC28DIWnbaud4G7CB13+zTwsrW2idAJfz6eZi2hF2sq3bb90eayfeADrgc+MMaMBaYB+/uTmyG8/caYzxJ6NnL9qYeUjDHjgDprrTXGlBIaXB47W+6htg8IPatYQGhkfg2hF1Z3uH7DAAAA4klEQVT71APn2s5+s1F4ZXUwvoArCT1V2ULoqeomQq+gjwHeBvaEv2eFpx9H6H/Qk0Bj+HbmmZZzhnUuIfSPtA948pT73yF03HMb8Gsg/QzzTyT0QtBe4AUguZdp1tK3d7nE4vZ/ObzeHkKjkp+fLdsw2wf5wJunLOOTLt3+nvC8H6/nW+H7vwRsJ/SukY+Ay2OwB0YBq8L74UNgzvn0AKHDVdVAK6H/zLZH2pP6pKiIiEvE1DF0ERE5MxW6iIhLqNBFRFxChS4i4hIqdBERl1Chi4i4hApdRMQlVOgiIi7x/wGDo2BWj6JXrwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(s_t.interpolate())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x27877ab2358>]"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFl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uAkH4LtfbpmrbUVwKt4npZhjFnhXf5lPP0f2hpjmh2zfCQQD3xqjMkFzgSWmNq9MBpM+18vHHQMbgbSvOvYAmzDE5CO239jzGw8rxP8z4/TrLVF1toj3vvvAWHmqBeNg+EYeB9L9d5fiOd6eG1zoF749BF0Dcl7LervwAZr7dNHPbQEuBGY671dXJf1WGt34jlT+nG+Zng/BBvYjedDsH/hfSzGWpvnXdcVQIZ3HROP2dbp1t6kAAABPElEQVQnwFV4rrvdCCy21hbiafjz4zyf4nmxZo3T9t/fHHYMdgDnA6uMMZ2BAUBOXeqmEe+/MeY2PM9Gzj/6kpIxpguwz1prjTGj8JxcHjxZ3Y3tGOB5VjEBz5n5uXheWK1VDpxqP+vM+uGV1Yb4As7C81TFheep6jo8r6B3AD4GNntv23vn74LnP2gRcNh7P+pE6znBNi/G80PaCtx/1PSVeK57ZgBvAK1PsHxvPC8EbQHeAZofZ55Pqd27XIJx/+/2brcaz1nJyyerLcSOQVfgg6PWcZ1D97/au+yP23nQO/0uIBPPu0a+BsYGYQ60BZZ5j8NqYOjp5ACey1W7gBI8/8wyfc1JjRQVEXGIoLqGLiIiJ6ZAFxFxCAW6iIhDKNBFRBxCgS4i4hAKdBERh1Cgi4g4hAJdRMQh/h80tm/l2eS49wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(s_t.interpolate(method='time'))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "高级插值方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0       1.441463\n",
       "1       0.893370\n",
       "2       1.823723\n",
       "3       2.791529\n",
       "4            NaN\n",
       "5       3.144456\n",
       "6       5.837723\n",
       "7       8.817557\n",
       "8       7.652842\n",
       "9      10.268457\n",
       "10     11.441191\n",
       "11     12.868882\n",
       "12     18.280260\n",
       "13           NaN\n",
       "14           NaN\n",
       "15           NaN\n",
       "16           NaN\n",
       "17           NaN\n",
       "18           NaN\n",
       "19     34.051881\n",
       "20           NaN\n",
       "21     40.651263\n",
       "22     43.138267\n",
       "23     45.168587\n",
       "24     50.264931\n",
       "25     53.157257\n",
       "26     57.203507\n",
       "27     61.117413\n",
       "28     63.884577\n",
       "29           NaN\n",
       "30     72.372133\n",
       "31     78.263659\n",
       "32     80.488678\n",
       "33     84.361620\n",
       "34     91.100527\n",
       "35     96.205014\n",
       "36    100.774454\n",
       "dtype: float64"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#第一步先生成数据\n",
    "ser = pd.Series(np.arange(1, 10.1, .25) ** 2 + np.random.randn(37))\n",
    "missing = np.array([4, 13, 14, 15, 16, 17, 18, 20, 29])\n",
    "ser[missing] = np.nan\n",
    "ser"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd4VGXexvHvb0oSQKp0aYKAIouAsYIiKgo2LGADRWXF3huwKq4VO1hZRCkqooII7ioIKCAWJICLIFJUmgQIEJCWMjPP+0dGX1ZDyyQ5M5P7c125ZubkTM7NucjNwzOnmHMOERFJXj6vA4iISMlS0YuIJDkVvYhIklPRi4gkORW9iEiSU9GLiCQ5Fb2ISJJT0YuIJDkVvYhIkgt4HQCgevXqrlGjRl7HEBFJKHPnzt3onKuxr/XiougbNWpERkaG1zFERBKKma3cn/U0dSMikuRU9CIiSU5FLyKS5F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mXPO5QLD8WCfJnLRJ8QtC82sgplV/P05cAawcO/v8txEoFf0eS9ggodZ9uj34oy6gDjYr2ZmwOvAYufcc7t9K6726Z5yxts+NbMaZlYl+rwccDoFnyd8DnSLrub5/oQ9Zv1xt3/gjYLPEkp9nyb0CVPRQ78G8f+3LHzM40h/YWaNKRjFQ8EdvUbHU04zewc4hYKr7K0HBgAfUnBUQwNgFdDdOefpB6F7yHkKBVMMjoIjm677fR7cK2bWHvgC+B6IRBf3p2D+O2726V5yXkYc7VMza0XBh61+Cgam7znnHo7+Xo2hYCpkPtAzOmL2zF6yfgbUoGC6+Tvg+t0+tC2dbIlc9CIism+JPHUjIiL7QUUvIpLkVPQiIklORS8ikuRU9CIiSU5FLyKS5FT0IiJJTkUvIpLk/g83KaPkLoubtQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "methods = ['linear', 'quadratic', 'cubic']\n",
    "for m in methods:\n",
    "    df = pd.DataFrame(ser.interpolate(method=m))\n",
    "    plt.plot(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.0\n",
       "1    2.0\n",
       "2    3.0\n",
       "3    NaN\n",
       "4    5.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#interpolate中的限制参数\n",
    "#limit表示最多插入多少个\n",
    "s = pd.Series([1,np.nan,np.nan,np.nan,5])\n",
    "s.interpolate(limit=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.0\n",
       "1    1.0\n",
       "2    1.0\n",
       "3    2.0\n",
       "4    3.0\n",
       "5    4.0\n",
       "6    5.0\n",
       "7    NaN\n",
       "8    NaN\n",
       "dtype: float64"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#limit_direction表示插值方向，可选forward,backward,both，默认前向\n",
    "s = pd.Series([np.nan,np.nan,1,np.nan,np.nan,np.nan,5,np.nan,np.nan,])\n",
    "s.interpolate(limit_direction='backward')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    NaN\n",
       "1    NaN\n",
       "2    1.0\n",
       "3    2.0\n",
       "4    3.0\n",
       "5    4.0\n",
       "6    5.0\n",
       "7    NaN\n",
       "8    NaN\n",
       "dtype: float64"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#limit_area表示插值区域，可选inside,outside，默认None\n",
    "s = pd.Series([np.nan,np.nan,1,np.nan,np.nan,np.nan,5,np.nan,np.nan,])\n",
    "s.interpolate(limit_area='inside')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    NaN\n",
       "1    NaN\n",
       "2    1.0\n",
       "3    NaN\n",
       "4    NaN\n",
       "5    NaN\n",
       "6    5.0\n",
       "7    5.0\n",
       "8    5.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.Series([np.nan,np.nan,1,np.nan,np.nan,np.nan,5,np.nan,np.nan,])\n",
    "s.interpolate(limit_area='outside')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "由于这两天参加省里的建模比赛，后面习题未做，下次打卡补上"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
